Direct memory access (DMA) is a feature of modern computers that allows hardware modules within the computer to access system memory independently of the central processing unit (CPU). Hardware modules that use DMA include disk drive controllers, graphics cards, network cards, sound cards, etc.
A typical computer system includes a DMA engine. The DMA engine is a dedicated data transfer device that can read incoming data from a hardware module and stores the data in the system memory for later retrieval by the CPU. The DMA engine can also read outgoing data from the system memory and write the data into a data buffer of a hardware module for use by the hardware module. Additionally, the DMA engine can perform data copies and scatter/gather operations, by which data is transferred to and from multiple memory areas in a single DMA transaction.
In a virtual machine system, operations of a guest are generally executed by the CPU. The CPU can be overloaded at times and, as a result, can slow down the operation of the guest. The performance of the system can be improved if some of the guest operations, such as data transfer operations, can be offloaded to the DMA engine. However, in a conventional virtual machine system, the DMA engine is in the host system and is not exposed to the guest.